package com.study.dao;

import com.study.domin.SysUser;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

/**
 * @author csc
 * @Description: 用户操作
 * @date 2023/7/248:57
 */
@Repository
public interface UserRepository extends JpaRepository<SysUser, Long> {


    SysUser queryByUsername(String username);

    @Query("SELECT u FROM SysUser u WHERE u.email = :email")
    SysUser queryByEmail(@Param("email") String email);

}
